Part Number Hot Search : 
15011 200BG BAV199L 2SK146 1N2469 3208EAUB PAN3501 G4RC10U
Product Description
Full Text Search
 

To Download A6850 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 A6850
(R)
Asynchronous Communications Interface Adapter
Data Sheet
September 1996, ver. 1
Features
s s s s s s s
A6850 MegaCore function implementing an asychronous communications interface adapter (ACIA) Optimized for FLEX(R) and MAX(R) architectures Programmable word lengths, stop bits, and parity Offers divide-by-1, -16, or -64 mode Includes error detection Uses approximately 237 FLEX logic elements (LEs) Functionally based on the Motorola MC6850 device, except as noted in the "Variations & Clarifications" section on page 94
General Description
The A6850 MegaCore function implements an ACIA, which is a universal asynchronous receiver/transmitter (UART). The A6850 provides an interface between a microprocessor and a serial communications channel. The A6850 receives and transmits data in a variety of configurations, including 7- or 8-bit data words, with odd, even, or no parity, and 1 or 2 stop bits. See Figure 1.
Figure 1. A6850 Symbol
A6850
nCTS nDCD E nRESET RS RnW RXCLK RXDATA TXCLK CS[2..0] DI[7..0] nIRQ nRTS TXDATA DO[7..0]
Altera Corporation
A-DS-A6850-01
81
A6850 Asynchronous Communications Interface Adapter Data Sheet
Table 1 describes the input and output ports of the A6850.
Table 1. A6850 Ports
Name
ncts ndcd
Type
Input Input
Polarity
Low Low
Description
Clear to send, a modem signal name. The ncts input inhibits the assertion of the transmit data register empty (tdre) status bit. Data carrier detect, a modem signal name. When the ndcd signal transitions from low to high, an interrupt to the microprocessor is generated. Enable for the microprocessor interface. When e is high, the microprocessor can access the registers. Asynchronous reset for the registers and control logic. The nreset pin was not included in the original MC6850 device. Register select. This input selects the register based on rnw. If rnw is high (signaling a read operation), then rs = 1 selects the receiver data register and rs = 0 selects the status register. However, if rnw is low (signaling a write operation), then rs = 1 selects the transmitter data register and rs = 0 selects the control register. Read/write register controls. When rnw is high, the microprocessor reads the registers; when rnw is low, the microprocessor writes to the registers. Receive clock. The receive control register samples rxdata based on rxclk and the state of the counter divide select (cds) bits in the control register. Receive data. Serial data input from the modem or peripheral. Transmit clock. Data is asserted to txdata on the falling edge of txclk. Chip select from the microprocessor. Chip select must be in the 110 state for the A6850 to be selected. Parallel data input from the microprocessor or other controlling device. Interrupt request to microprocessor. Request to send. Bits 5 and 6 (transmitter control bits) of the control register set the nrts bit. The nrts signal is asserted when bit 6 is low, or bits 5 and 6 are both high. Transmit data. Serial output to the modem or peripheral. Parallel data output to the microprocessor or other controlling device.
e nreset rs
Input Input Input
High Low -
rnw
Input
Low
rxclk
Input
-
rxdata txclk cs[2..0] di[7..0] nirq nrts
Input Input Input Input Output Output
- - - - Low Low
txdata do[7..0]
Output Output
- -
82
Altera Corporation
A6850 Asynchronous Communications Interface Adapter Data Sheet
Functional Description
Figure 2 shows the A6850 block diagram.
Figure 2. A6850 Block Diagram
Transmitter Output Shift Register/ Parity Generate
di
8
Transmitter Data Register
8
txclk txdata
8
Control Register e rnw cs rs
3
Transmitter Control
ncts ndcd
Bus Interface Control
Receiver nrts
nirq
8 8 8
Status Register
Receiver Control
do
Receiver Data Register
8
Input Shift Register/ Parity Check
rxdata
rxclk
Registers
The A6850 contains the following registers:
s s s s
Transmitter data register Receiver data register Control register Status register
Altera Corporation
83
A6850 Asynchronous Communications Interface Adapter Data Sheet
Transmitter Data Register
The transmitter data register (TDR) is written to by the microprocessor or other controlling device. Once the existing data bits in the output shift register are completely transmitted out, the TDR transfers new data into the output shift register.
Receiver Data Register
The receiver data register (RDR) is written to by the input shift register. Once the existing data in the RDR is read, the input shift register transfers new data into the RDR. If 7-bit data is selected, bit 7 is set to a logic low.
Control Register
The control register contains the control bits shown in Table 2.
Table 2. Control Register Bits
Data Bit
0 1 2 3 4 5 6 7
Signal Name
Counter divide select 0 (cds0) Counter divide select 1 (cds1) Word select 0 (ws0) Word select 1 (ws1) Word select 2 (ws2) Transmitter control 0 (tc0) Transmitter control 1 (tc1) Receive interrupt enable (rie)
Counter Divide Select Bits 0 and 1 of the control register are the cds bits, which determine the ratio between the data rate and the clocks. The ratios when transmitting and receiving are identical. The cds bits can also be used to reset the A6850 to a known state. See Table 3.
84
Altera Corporation
A6850 Asynchronous Communications Interface Adapter Data Sheet
Table 3. Counter Divide Select Bits
cds1
0
cds0
0
Function
Divide-by-1 mode. Clock and data rate are identical. External logic is responsible for synchronizing rxdata to rxclk. The rxdata signal is sampled on the rising edge of rxclk, and the txdata signal is asserted on the falling edge of txclk. Divide-by-16 mode. The clock rate is 16 times the data rate. After start bit detection (rxdata low), the rxdata signal is sampled on the 9th rising edge of rxclk. After writing to the transmitter data register, the txdata signal is asserted on the first falling edge of txclk and every 16 clocks thereafter. Divide-by-64 mode. The clock rate is 64 times the data rate. After start bit detection (rxdata low), the rxdata signal is sampled on the 33rd rising edge of rxclk. After writing to the transmitter data register, the txdata signal is asserted on the first falling edge of txclk and every 64 clocks thereafter. Master reset. When master reset is selected, the A6850 is reset to a known state; the status register is cleared, and the transmit and receive operations are halted and initialized.
0
1
1
0
1
1
Word Select Bits 2, 3, and 4 of the control register are the ws bits, which determine the word length, parity, and number of stop bits. See Table 4.
Table 4. Word Select Bits
ws2
0 0 0 0 1 1 1 1
ws1
0 0 1 1 0 0 1 1
ws0
0 1 0 1 0 1 0 1
Word Length
7 7 7 7 8 8 8 8
Stop Bits
2 2 1 1 2 1 1 1
Parity
Even Odd Even Odd None None Even Odd
Altera Corporation
85
A6850 Asynchronous Communications Interface Adapter Data Sheet
Transmitter Control Bits 5 and 6 of the control register are the tc bits, (see Table 5). The tc bits are responsible for:
s s s
Enabling or disabling the interrupt caused by a transmitter data register empty (tdre) condition. Controlling the request to send (nrts) signal. Transmitting a break character on the txdata output.
Table 5. Transmitter Control Bits
tc1
0 0 1 1
tc0
0 1 0 1
nrts
Low Low High Low
Transmit Interrupt
Disabled Enabled Disabled Disabled
Break Character
No No No Yes
Receive Interrupt Enable Bit 7 of the control register is the rie bit. When the rie bit is high, the rdrf, ndcd, and ovr bits will assert the nirq output. When the rie bit is low, nirq generation is disabled.
Status Register
The status register contains the status bits shown in Table 6.
Table 6. Status Register Bits
Data Bit
0 1 2 3 4 5 6 7
Bit Name
Receive data register full (rdrf) Transmit data register empty (tdre) Data carrier detect (ndcd) Clear to send (ncts) Framing error (fe) Receiver overrun (ovr) Parity error (pe) Interrupt request (irq)
86
Altera Corporation
A6850 Asynchronous Communications Interface Adapter Data Sheet
Receiver Data Register Full Bit 0 of the status register is the rdrf bit. When high, the rdrf bit indicates that received data has been transferred into the receiver data register and is ready to be read by the microprocessor. If the receive interrupt is enabled, then the nirq signal is asserted. The rdrf bit is cleared when either the nreset signal is asserted, the microprocessor reads the receiver data register, or the control register is set to master reset mode. Transmitter Data Register Empty Bit 1 of the status register is the tdre bit. When high, the tdre bit indicates that data has been transferred from the transmitter data register to the output shift register. At this point, the A6850 is ready to accept a new transmit data byte. However, if the ncts signal is high, the tdre bit remains low regardless of the status of the transmitter data register. Also, if transmit interrupt is enabled, the nirq output is asserted. The tdre bit is cleared when the nreset signal is asserted, the microprocessor writes to the transmitter data register, or the control register is set to master reset mode. Data Carrier Detect Bit 2 of the status register is the ndcd bit, which reflects the status of the ndcd input. When the ndcd input transitions from low to high, the status bit is set to a logic high. If the receive interupts are enabled, a low on the nirq output is produced. Once the ndcd bit is set, it remains high regardless of the state of the ndcd input until one of the following conditions occurs:
s s s
The status register is read after reading the receiver data register. The nreset signal is asserted. The control register is set to master reset mode.
Clear to Send Bit 3 of the status register is the ncts bit, and reflects the status of the ncts input. The nreset input sets ncts bit to a logic high until the next rising edge of txclk.
Altera Corporation
87
A6850 Asynchronous Communications Interface Adapter Data Sheet
Framing Error Bit 4 of the status register is the fe bit. The fe bit is asserted when a received character does not end with the specified stop bit, which is usually caused by a transmission error. The fe bit is set when the received character is transferred to the receiver data register, and remains set until another character is written to the receiver data register. The fe bit is cleared when either the nreset signal is asserted, a character is written to the receiver data register that does not have an fe error, or the control register is set to master reset mode. Receiver Overrun Bit 5 of the status register is the ovr bit. The ovr bit indicates a receiver overrun condition, i.e., one or more receiver data words have been overwritten in the input shift register. The overrun condition is considered to occur at the midpoint of the last received bit in the input shift register, when the previous word (in the RDR) has not yet been read by the microprocessor. However, the ovr bit is not set immediately when the overrun occurs, but is set when the valid word in the RDR is read. Thus, when the overrun condition occurs, it is the input shift register data that is overwritten, not the RDR data. The ovr bit is cleared when either the nreset signal is asserted, the data in the receiver data register is read, or the control register is set to master reset mode. Parity Error Bit 6 of the status register is the pe bit. When it is high, pe indicates that the parity bit received (over the rxdata input), does not match the parity calculated during the receive process. The pe bit is set when the data is written into the receiver data register. If no parity is selected, the parity error will not occur. The pe bit is cleared when either the nreset signal is asserted, the data is read from the receiver data register, or the control register is set in master reset mode. Interrupt Request Bit 7 of the status register is the irq bit, the logical inverse of the nirq output. See "Interrupt Operation" on page 93 of this data sheet for more information.
88
Altera Corporation
A6850 Asynchronous Communications Interface Adapter Data Sheet
Operation
This section describes the following:
s s s s s
Bus interface operation Receiver operation Transmitter operation Interrupt operation Reset operation
Bus Interface Operation
A microprocessor or other controlling device accesses the A6850 through the bus interface, which provides a direct link to the transmit, receive, status, and control registers. The microprocessor interfaces with the A6850 when the cs input is set to a logic 110 and the rnw input is set to a logic low when writing, or a logic high when reading. The rs input then chooses the appropriate register operation as shown in Table 7.
Table 7. Register Operations
rnw
0 0 1 1
rs
0 1 0 1
Register Operation
Control register write Transmit data register write Status register read Receive data register read
When cs, rnw, and rs are set, access begins when the e input transitions from low to high. The e input must be high for at least one txclk cycle. In a read cycle, the data is available through the data output (do) bus on the rising edge of the e input. In a write cycle, the data is written on the falling edge of the e input. See Figure 3.
Altera Corporation
89
A6850 Asynchronous Communications Interface Adapter Data Sheet
Figure 3. Read & Write Cycle Waveforms
The X indicates "don't care." Control signal setup
Read X X X 110 Valid X Undefined Valid Undefined X X X 110 Valid Valid
Control signal setup
Write
Data input setup
e rnw cs rs di do
X X X X
Receiver Operation
Receiver operation includes the following functions:
s s s s s
Start bit detection Data bit sampling Parity & stop bit detection Error detection Receive data register transfer
Start Bit Detection
The A6850 begins receiving data when a start bit is detected. A start bit is a logic low over the rxdata input, and is sampled on each rising edge of the rxclk signal. Once the A6850 detects a logic low, it begins counting the logic low samples according to the specified divide-by mode (i.e., -1, -16, or -64). For example, after detecting a logic low in divide-by-1 mode, the A6850 assumes the next rising edge is data. After detecting a logic low in divideby-16 mode, however, the A6850 counts 8 clock edges and samples again. The data must still be a logic low. At this point, the A6850 assumes the data and clock are synchronized, and samples data every 16 clock edges thereafter. Divide-by-64 mode is similar to divide-by-16, with the logic low sampled at the first rising edge and the 32nd rising edge of rxclk. Data is then sampled every 64 rising edges.
90
Altera Corporation
A6850 Asynchronous Communications Interface Adapter Data Sheet
Data Bit Sampling
After detecting a logic low, the A6850 samples and shifts the data into the input shift register. Data bit sampling occurs on every rising edge in divide-by-1 mode, every 16 rising edges in divide-by-16 mode, and every 64 rising edges in divide-by-64 mode. Each time a bit is sampled, parity is calculated for future error detection. See Figure 4.
Figure 4. A6850 Receiver Functional Waveforms
Divide-by-1 Mode
rxclk or txclk rxdata Sampled on rising edge of rxclk txdata Driven from falling edge of txclk
Divide-by-16 Mode
rxdata rxclk Sampling Pulse
Start Bit
Data Bit
txdata txclk
Start Bit
Data Bit
Parity & Stop Bit Detection
The A6850 counts the number of data bits as it shifts. When the number of data bits received matches the number specified in the control register, the A6850 expects either a parity bit or a stop bit. If parity is enabled, the A6850 samples for the parity bit, which is then processed for parity. However, if parity is not enabled, the A6850 samples for a stop bit (i.e., logic high). If a logic low is sampled, the fe bit is set in the status register.
Altera Corporation
91
A6850 Asynchronous Communications Interface Adapter Data Sheet
The A6850 receives data with one or two stop bits. If one stop bit is specified in the control register, the A6850 will expect one stop bit before starting the synchronization process. Similarly, if two stop bits are specified, the synchronization process begins after detecting two stop bits.
Error Detection
Three errors can occur when receiving: framing, overrun, and parity. Refer to the status register error definitions on page 88 of this data sheet for more information.
Receive Data Register Transfer
Once the last stop bit is received or a framing error is detected, the data in the input shift register is transferred to the receiver data register. At this point, all status bits associated with this data word are set, including the rdrf bit. If receive interrupt is enabled, an interrupt on nirq is generated. The receive process concludes when the microprocessor reads data from the receiver data register.
Transmit Operation
The transmit operation includes the following functions:
s s s s s
Transmit data register write/transfer Transmit start bit Transmit data Transmit parity bit Transmit stop bit
Transmit Data Register Write/Transfer
A transmit operation starts when the microprocessor writes data to the transmitter data register. In the initial write operation, if the output shift register is empty, data is immediately transferred and the shift operation begins. However, if a shift operation is underway, the data is held in the transmitter data register until the active shift operation is finished. When data is in the transmitter data register, the tdre signal is cleared. Once the data is transferred to the output shift register, the tdre status bit is set. At this point, if transmit interrupt is enabled, an interrupt on nirq is generated.
92
Altera Corporation
A6850 Asynchronous Communications Interface Adapter Data Sheet
Transmit Start Bit
After data is transferred to the output shift register, a start bit (i.e., logic low) is placed on the txdata output on the falling edge of txclk. The start bit stays active for the number of clock cycles specified by the divide-by mode (i.e., 1, 16, or 64).
Transmit Data
After the start bit, the data bits shift out of the register one at a time, from the least significant to the most significant. The cycle time for each bit starts at the beginning of the specified clock cycle (i.e., -1, -16, or -64). The number of bits shifted out corresponds to the number of bits specified in the control register.
Transmit Parity Bit
If parity is enabled, the bit following the last data bit is a parity bit. The parity bit has a value that forces all the data to have the correct parity. For example, if parity is set to odd in the control register, then the parity bit guarantees there are an odd number of 1s (i.e., data plus the parity bit). If parity is set to even in the control register, then the parity bit guarantees there is an even number of 1s (i.e., data plus the parity bit).
Transmit Stop Bit
After the parity bit is transmitted, or the last data bit if parity is not enabled, one or two stop bits are transmitted on txdata output. The output then stays high until the beginning of the next data word transmission.
Interrupt Operation
The nirq output is designed to be an interrupt to a microprocessor or other controlling device. The nirq outputs a variety of conditions including transmit and receive.
Altera Corporation
93
A6850 Asynchronous Communications Interface Adapter Data Sheet
The transmit operation produces an interrupt (i.e., logic low on nirq) when the following conditions all occur:
s s s
Transmit interrupts are enabled. The tdre flag is set. The ncts signal is low.
The receive operation produces an interrupt when the following conditions occur:
s s
Receive interrupts are enabled (i.e., the rie control signal is high). Any one of the following signals is set: rdrf, ovr, or ndcd.
Reset Operation
The A6850 is reset in one of two ways:
s s
Driving the nreset input low. Writing logic 1s into the cds bits of the control register.
The nreset input is used as an asynchronous clear to all internal registers. Placing the A6850 into master reset will synchronously clear the registers. However, master reset only works if both clocks are running.
Variations & Clarifications
The following characteristics distinguish the Altera(R) A6850 from the Motorola MC6850 device:
s s s
s
The A6850 has separate input and output data buses, while the MC6850 device has a single tri-state data bus. The nreset (asychronous reset) input on the A6850 is not available in the Motorola MC6850 device. The A6850 bus interface was designed using synchronous design techniques, allowing it to operate using various part designations, speed grades, and optimization techniques. The A6850 requires that the txclk signal is always connected to a free running clock, and that the e signal is high for at least one txclk clock cycle when reading and writing data.
94
Altera Corporation
Copyright (c) 1995, 1996, 1997, 1998, 1999 Altera Corporation, 101 Innovation Drive, San Jose, CA 95134, USA, all rights reserved. By accessing this information, you agree to be bound by the terms of Altera's Legal Notice.


▲Up To Search▲   

 
Price & Availability of A6850

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X